<!--extend index-->
<!--已使用naples bootstrap模板-->

<block_title>验证码生成</block_title>

<block_content>
    <h3>naples也提供了简单的验证码机制</h3>
    <br/>
    {{captcha 320 140}}
    <form action="" style="width: 320px;" method="get" class="form-inline" role="form">

        <div class="form-group">
            <label class="sr-only" >label</label>
            <input style="width:261px;" type="text" class="form-control" name="cap" placeholder="输入验证码 ...">
        </div>

        <button type="submit" class="btn btn-primary">检验</button>
    </form>
    <br/>
    {{if $cap_right}}
    <div id="alert1" style="width: 320px;" class="alert alert-success">
        <a href="#alert1" class="close" data-dismiss="alert">&times;</a>
        <strong>成功！</strong>验证码输入正确。
    </div>
    {{else}}
    <div id="alert2" style="width: 320px;" class="alert alert-warning">
        <a href="#alert2" class="close" data-dismiss="alert">&times;</a>
        <strong>警告！</strong>验证码未输入或输入错误。
    </div>
    {{/}}
</block_content>